import VueRouter from 'vue-router'
// 导入登录和注册对应的路由组件
import Login from '../components/Login.vue'
import Register from '../views/Register.vue'
import UserInfo from '../views/UserInfo.vue'

var router = new VueRouter({// 创建路由对象
    routes: [// 配置路由规则
        { path: '/', redirect: '/login' },
        { path: '/login', component: Login },
        { path: '/userInfo', component: UserInfo },
        { path: '/register', component: Register }
    ]
})
export default router